<?php
/**
 * Created by PhpStorm.
 * User: ljc
 * Date: 2018/8/15
 * Time: 14:51
 */

namespace App\apitransifer;


use League\Fractal\TransformerAbstract;
use Modules\Shop\Entities\Article;

class ArticleTransformer extends TransformerAbstract
{
	public function transform(Article $article){
		return [
			'id'=>$article['id'],
			'title'=>$article['title'],
			'thumb'=>$article['thumb'],
			'introduce'=>$article['introduce'],
			'content'=>$article['content']
		];
	}
}